﻿using System;
using RAP.Framework.Libary.Utils;

namespace RAP.Framework.Libary.DomTemplateBuilder.Element
{
	/// <summary>
	/// 值类型约束的节点
	/// </summary>
	public class ValueTyped : Dynamic, IValueTypedElement
    {
		protected TypeCode? _valueType = null;
		public virtual TypeCode ValueType
		{
			get
			{
				if ( this._valueType == null )
				{
					lock ( this )
					{
						if ( this._valueType == null )
						{
							_valueType = this.ToEnumValue<TypeCode> ( "ValueType", TypeCode.Empty );
						}
					}
				}
				return _valueType.Value;
			}
		}

	}
}
